package com.lyz.dataStructure.LeetCode.ListNode;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 20:06
 * @Description:
 **/

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/7/19 20:06
 *@Description:
 **/
public class ListNode {
    int val;
    ListNode next;
    public ListNode(int val){
        this.val = val;
    }

    @Override
    public String toString(){
        if(this.next==null){
            return  String.valueOf(this.val);
        }
        return  this.val + "->"+ this.next.toString();
    }
}
